package com.choosefine.devops.dms.system.pages;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import org.springframework.data.mongodb.core.mapping.Document;

import com.fasterxml.jackson.annotation.JsonIgnore;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * Created by 邱鹏 on 2017/3/2.
 */
@Document(collection="menu")
public class Menu implements Serializable{
	private static final long serialVersionUID = 1L;
	private String link;
    private String icon;
    private String title;
    private String parentCode;
    private String code;
    @JsonIgnore
    private List sub=new ArrayList<>();
	public String getLink() {
		return link;
	}
	public void setLink(String link) {
		this.link = link;
	}
	public String getIcon() {
		return icon;
	}
	public void setIcon(String icon) {
		this.icon = icon;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public List getSub() {
		return sub;
	}
	public void setSub(List sub) {
		this.sub = sub;
	}
	public String getParentCode() {
		return parentCode;
	}
	public void setParentCode(String parentCode) {
		this.parentCode = parentCode;
	}
	@Override
	public String toString() {
		return "Menu [link=" + link + ", icon=" + icon + ", title=" + title + ", parentCode=" + parentCode + ", code="
				+ code + ", sub=" + sub + "]";
	}
	public Menu(String link, String icon, String title, String parentCode, String code, List sub) {
		super();
		this.link = link;
		this.icon = icon;
		this.title = title;
		this.parentCode = parentCode;
		this.code = code;
		this.sub = sub;
	}
	public Menu() {
		super();
	}
}
